function handles = analyzeEPArray_editEP(handles)
% analyzeEPArray_editEP
% 
% 
% 
% editing
% gs june 2006
% --------------------------------------------------------


prompt = {'Enter trace number:','Enter number of spikes:', 'Enter spike latency (first spike only):'};
dlg_title = 'Edit spike detection for excitation profile';
num_lines= 1;
def     = {'10','5','.03'};
answer  = inputdlg(prompt,dlg_title,num_lines,def,'on');

traceNum = str2num(answer{1})
numSpikes = str2num(answer{2})
apDelay = str2num(answer{3})

handles.data.map.mapActive.apDelayArray = []; % kluge -- for now, skip the apDelayArray (i.e., ignore higher-order spikes)

% update handles variable with the new values
handles.data.map.mapActive.apNumber(traceNum) = numSpikes;
handles.data.map.mapActive.apDelay(traceNum) = apDelay;


handles = makeMapDataArray(handles);
disp('% EXCITATION PROFILE ANALYSIS:');
disp('map.apBinary = [');
disp(handles.data.map.mapActive.mapDataArray(:,:,8));
disp('];');
disp('map.apNumber = [');
disp(handles.data.map.mapActive.mapDataArray(:,:,6));
disp('];');
disp('map.apDelay = [');
disp(handles.data.map.mapActive.mapDataArray(:,:,7));
disp('];');
disp('map.spikeLatencies = [');
disp(handles.data.map.mapActive.apDelayArray);
disp('];');    
